package DataAccess;

//////////////////////////////////////////////////////////////////////////
// �� �� ��: Dail_log.cs
// �� �� ��: otyg
// ��������: DateTime.Now();
// ��    ��: ��װ���ݱ�[Dail_log]��ز���
// ģ���޸�: 
//     2006-11-17  ֧��ChangePage�ؼ���ֻװ�ص�ǰҳ���ݹ���
//     2006-10-28  ����ͨ��DataRowView���쵥��������
//     2006-10-16  ���뼯�ϲ���foreach/Add/Remove�ȹ���,����Transaction����
// ��    Ȩ: ���������  QQ:1775068  
//////////////////////////////////////////////////////////////////////////
/** 
 Data Access Layer Object Of Dail_log
*/
public class Dail_log extends DataAccessBase
{
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#region ����ͻ���
	public Dail_log()
	{
		super();
		_DataRow.setItem("Dail_id", 0);
		_DataRow.setItem("Dail_name", "");
		_DataRow.setItem("Hy_num", 0);
		_DataRow.setItem("Hy_name", "");
		_DataRow.setItem("Daig_id", "");
		_DataRow.setItem("Daig_shijian", java.time.LocalDateTime.MIN);
		_DataRow.setItem("Xiaofei", java.math.BigDecimal.Parse("0"));
		_DataRow.setItem("Tichengbili", java.math.BigDecimal.Parse("0"));
		_DataRow.setItem("Tichengjine", java.math.BigDecimal.Parse("0"));
		_DataRow.setItem("Addtime", java.time.LocalDateTime.MIN);
	}
	public Dail_log(DataRow dataRow)
	{
		super(dataRow);
	}
	public Dail_log(DataRowView dataRowView)
	{
		super(dataRowView);
	}
	@Override
	protected DataRow BuildRow()
	{
		DataTable dt = new DataTable();
		dt.Columns.Add("Dail_id",Integer.class);
		dt.Columns.Add("Dail_name",String.class);
		dt.Columns.Add("Hy_num",Integer.class);
		dt.Columns.Add("Hy_name",String.class);
		dt.Columns.Add("Daig_id",String.class);
		dt.Columns.Add("Daig_shijian",java.time.LocalDateTime.class);
		dt.Columns.Add("Xiaofei",java.math.BigDecimal.class);
		dt.Columns.Add("Tichengbili",java.math.BigDecimal.class);
		dt.Columns.Add("Tichengjine",java.math.BigDecimal.class);
		dt.Columns.Add("Addtime",java.time.LocalDateTime.class);
		return dt.NewRow();
	}
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#endregion ����ͻ���
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#region ����
	public final DataRow getDataRow()
	{
		return super._DataRow;
	}
	public final int getDail_id()
	{
		return Integer.parseInt(_DataRow.getItem("Dail_id").toString());
	}
	public final void setDail_id(int value)
	{
		_DataRow.setItem("Dail_id", value);
	}
	public final String getDail_name()
	{
		return _DataRow.getItem("Dail_name").toString();
	}
	public final void setDail_name(String value)
	{
		_DataRow.setItem("Dail_name", value);
	}
	public final int getHy_num()
	{
		return Integer.parseInt(_DataRow.getItem("Hy_num").toString());
	}
	public final void setHy_num(int value)
	{
		_DataRow.setItem("Hy_num", value);
	}
	public final String getHy_name()
	{
		return _DataRow.getItem("Hy_name").toString();
	}
	public final void setHy_name(String value)
	{
		_DataRow.setItem("Hy_name", value);
	}
	public final String getDaig_id()
	{
		return _DataRow.getItem("Daig_id").toString();
	}
	public final void setDaig_id(String value)
	{
		_DataRow.setItem("Daig_id", value);
	}
	public final java.time.LocalDateTime getDaig_shijian()
	{
		return java.time.LocalDateTime.parse(_DataRow.getItem("Daig_shijian").toString());
	}
	public final void setDaig_shijian(java.time.LocalDateTime value)
	{
		_DataRow.setItem("Daig_shijian", value);
	}
	public final java.math.BigDecimal getXiaofei()
	{
		return java.math.BigDecimal.Parse(getXiaofei().toString());
	}
	public final void setXiaofei(java.math.BigDecimal value)
	{
		_DataRow.setItem("Xiaofei", value);
	}
	public final java.math.BigDecimal getTichengbili()
	{
		return java.math.BigDecimal.Parse(getTichengbili().toString());
	}
	public final void setTichengbili(java.math.BigDecimal value)
	{
		_DataRow.setItem("Tichengbili", value);
	}
	public final java.math.BigDecimal getTichengjine()
	{
		return java.math.BigDecimal.Parse(getTichengjine().toString());
	}
	public final void setTichengjine(java.math.BigDecimal value)
	{
		_DataRow.setItem("Tichengjine", value);
	}
	public final java.time.LocalDateTime getAddtime()
	{
		return java.time.LocalDateTime.parse(_DataRow.getItem("Addtime").toString());
	}
	public final void setAddtime(java.time.LocalDateTime value)
	{
		_DataRow.setItem("Addtime", value);
	}
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#endregion ����
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#region ��������
	protected final boolean DeleteByCondition(String condition)
	{
		String sql = "" + "\r\n" +
"				Delete From Dail_log" + "\r\n" +
"				WHERE " + condition;
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
//#if(DEBUG)
		super.ExecuteSQL(sql);
//#else
		try
		{
			super.ExecuteSQL(sql);
		}
		catch (java.lang.Exception e)
		{
			return false;
		}
//#endif
		return true;
	}
//		public bool Delete()
//		{
//			string condition = 
//			return DeleteByCondition(condition);
//		}
//		public bool Delete()
//		{
//			string condition = 
//			return DeleteByCondition(condition);
//		}
	public final boolean Insert()
	{
			String sql = "" + "\r\n" +
"				Insert Into Dail_log (" + "\r\n" +
"					Dail_id," + "\r\n" +
"					Dail_name," + "\r\n" +
"					Hy_num," + "\r\n" +
"					Hy_name," + "\r\n" +
"					Daig_id," + "\r\n" +
"					Daig_shijian," + "\r\n" +
"					Xiaofei," + "\r\n" +
"					Tichengbili," + "\r\n" +
"					Tichengjine," + "\r\n" +
"					Addtime" + "\r\n" +
"				) Values (" + "\r\n" +
"					" + getDail_id() + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getDail_name()) + "," + "\r\n" +
"					" + getHy_num() + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getHy_name()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getDaig_id()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getDaig_shijian().toString()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getXiaofei().toString()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getTichengbili().toString()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getTichengjine().toString()) + "," + "\r\n" +
"					" + Helper.ToSQLParamStr(getAddtime().toString()) + "\r\n" +
"				)";
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
//#if(DEBUG)
		super.ExecuteSQL(sql);
//#else
		try
		{
			super.ExecuteSQL(sql);
		}
		catch (java.lang.Exception e)
		{
			return false;
		}
//#endif
		return true;
	}
	protected final boolean SelectByCondition(String condition)
	{
		String sql = "" + "\r\n" +
"				Select" + "\r\n" +
"					Dail_id," + "\r\n" +
"					Dail_name," + "\r\n" +
"					Hy_num," + "\r\n" +
"					Hy_name," + "\r\n" +
"					Daig_id," + "\r\n" +
"					Daig_shijian," + "\r\n" +
"					Xiaofei," + "\r\n" +
"					Tichengbili," + "\r\n" +
"					Tichengjine," + "\r\n" +
"					Addtime" + "\r\n" +
"				  From Dail_log" + "\r\n" +
"				 Where " + condition + "\r\n" +
"			";
		DataTable dt;
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
//#if(DEBUG)
		dt = super.GetDataTable(sql);
//#else
		try
		{
			dt = super.GetDataTable(sql);
		}
		catch (java.lang.Exception e)
		{
			return false;
		}
//#endif
		try
		{
			_DataRow = dt.Rows[0];
		}
		catch (java.lang.Exception e2)
		{
			return false;
		}
		return true;
	}
	public final boolean SelectByPk()
	{
		String condition = "1=1" + "\r\n" +
"			";
		return SelectByCondition(condition);
	}
//		public bool Update()
//		{
//			string sql=@"
//				Update Dail_log SET
//					Dail_id=" + Dail_id + @",
//					Dail_name=" + Helper.ToSQLParamStr(Dail_name) + @",
//					Hy_num=" + Hy_num + @",
//					Hy_name=" + Helper.ToSQLParamStr(Hy_name) + @",
//					Daig_id=" + Helper.ToSQLParamStr(Daig_id) + @",
//					Daig_shijian=" + Helper.ToSQLParamStr(Daig_shijian.ToString()) + @",
//					Xiaofei=="+Helper.ToSQLParamStr(Xiaofei.ToString() + @" ,
//					Tichengbili="+Helper.ToSQLParamStr(Tichengbili.ToString())+@",
//					Tichengjine="+Helper.ToSQLParamStr(Tichengjine.ToString())+@",
//					Addtime=" + Helper.ToSQLParamStr(Addtime.ToString()) + @"
//					Where 1=1
//					";
///#if(DEBUG)
//			return (base.ExecuteSQL(sql)==1);
///#else
//			try
//			{
//				return (base.ExecuteSQL(sql)==1);
//			}
//			catch
//			{
//				return false;
//			}
///#endif
//		}

//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#endregion ��������
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#region ���淽��
	//TODO: �����ķ������������
//C# TO JAVA CONVERTER TODO TASK: There is no preprocessor in Java:
		///#endregion ���淽��
}